<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=375, initial-scale=1.0">
    <title>订单详情 - 三角洲行动代练</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f0f2f5;
        }
        .phone-frame {
            width: 375px;
            height: 812px;
            background: #000;
            border-radius: 40px;
            padding: 12px;
            box-shadow: 0 0 20px rgba(0,0,0,0.2);
            position: relative;
            overflow: hidden;
        }
        .phone-screen {
            width: 100%;
            height: 100%;
            background: white;
            border-radius: 32px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .content-area {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 80px;
        }
        .content-area::-webkit-scrollbar {
            width: 4px;
        }
        .content-area::-webkit-scrollbar-track {
            background: #f1f5f9;
        }
        .content-area::-webkit-scrollbar-thumb {
            background: #94a3b8;
            border-radius: 2px;
        }
        .order-type-tag {
            padding: 1px 6px;
            background: #EFF6FF;
            border-radius: 3px;
            font-size: 11px;
            color: #3B82F6;
            margin-right: 6px;
        }
        .order-status-badge {
            padding: 1px 6px;
            font-size: 11px;
            font-weight: bold;
            border-radius: 999px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.04);
            background: #f3f4f6;
            color: #6b7280;
        }
        .info-item {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid #f5f5f5;
        }
        .info-item:last-child {
            border-bottom: none;
        }
        .info-label {
            color: #6B7280;
            font-size: 14px;
        }
        .info-value {
            color: #1F2937;
            font-size: 14px;
            text-align: right;
        }
        .price-value {
            color: #EF4444;
            font-weight: bold;
        }
        .section-title {
            display: flex;
            align-items: center;
            font-size: 16px;
            font-weight: bold;
            color: #1F2937;
            margin-bottom: 12px;
        }
        .section-title i {
            margin-right: 8px;
        }
        .copy-btn {
            margin-left: 8px;
            color: #94a3b8;
            cursor: pointer;
            transition: color 0.2s;
        }
        .copy-btn.copied {
            color: #22c55e;
        }
        .copy-btn:hover {
            color: #2563eb;
        }
        /* 取消申请卡片样式 */
        .cancel-apply-card {
            background: white;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            margin-bottom: 12px;
        }
        .cancel-apply-header {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }
        .cancel-apply-title {
            font-size: 16px;
            font-weight: bold;
            color: #1f2937;
            margin-left: 8px;
        }
        .cancel-apply-content {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .cancel-apply-item {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }
        .cancel-apply-label {
            color: #6b7280;
            font-size: 14px;
        }
        .cancel-apply-value {
            color: #1f2937;
            font-size: 14px;
            text-align: right;
            max-width: 70%;
        }
        .cancel-apply-value.reason {
            color: #6b7280;
            text-align: left;
        }
        .cancel-apply-value.amount {
            color: #3b82f6;
            font-weight: bold;
        }
        /* 弹窗样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 50;
        }
        .modal-content {
            width: 320px;
            max-width: 90vw;
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .modal-title {
            font-size: 18px;
            font-weight: bold;
            color: #111827;
            margin-bottom: 12px;
        }
        .modal-message {
            font-size: 14px;
            color: #374151;
            line-height: 1.5;
            margin-bottom: 16px;
            width: 100%;
            text-align: left;
        }
        .modal-buttons {
            display: flex;
            width: 100%;
            gap: 12px;
            margin-top: 8px;
        }
        .modal-button {
            flex: 1;
            padding: 8px;
            border-radius: 9999px;
            font-size: 16px;
            font-weight: 500;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .modal-button.cancel {
            background: #E5E7EB;
            color: #374151;
        }
        .modal-button.cancel:hover {
            background: #D1D5DB;
        }
        .modal-button.confirm {
            background: #3B82F6;
            color: white;
        }
        .modal-button.confirm:hover {
            background: #2563EB;
        }
        .modal-button.reject {
            background: #EF4444;
            color: white;
        }
        .modal-button.reject:hover {
            background: #DC2626;
        }
    </style>
</head>
<body class="flex items-center justify-center min-h-screen">
    <div class="phone-frame">
        <div class="phone-screen">
            <!-- 状态栏 -->
            <div class="flex items-center justify-between h-7 px-4 bg-white select-none">
                <span class="text-xs font-medium text-black tracking-widest">10:50</span>
                <div class="flex items-center space-x-1">
                    <svg class="w-4 h-4 text-black" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6.5 3.5L4 6m13.5-2.5L20 6M12 8v4l3 3m-3 7a8 8 0 100-16 8 8 0 000 16z"/></svg>
                    <span class="text-[10px] font-bold text-black">5.00</span>
                    <span class="text-[10px] text-black">KB/S</span>
                    <svg class="w-4 h-4 text-black" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.05 7.05A16 16 0 0112 3c2.5 0 4.89.58 7.05 1.64M5.07 10.07A11 11 0 0112 7c2.21 0 4.3.6 6.07 1.64M8.11 13.11A6 6 0 0112 11a6 6 0 013.89 2.11M12 17h.01"/></svg>
                    <svg class="w-4 h-4 text-black" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2 20h.01M7 16v4m5-8v12m5-16v16"/></svg>
                    <span class="text-xs font-bold text-black ml-0.5">5G</span>
                    <div class="flex items-center ml-1">
                        <div class="w-6 h-3 rounded-sm border border-black flex items-center relative">
                            <div class="bg-black h-2 rounded-l-sm" style="width:70%"></div>
                        </div>
                        <span class="text-xs font-bold text-black ml-1">78</span>
                    </div>
                </div>
            </div>
            <!-- 标题栏 -->
            <div class="flex items-center h-12 bg-white select-none border-b border-gray-100 px-4 relative">
                <!-- 返回按钮 -->
                <div class="flex-shrink-0 flex items-center z-10">
                    <button class="p-2 -ml-2 focus:outline-none">
                        <svg class="w-6 h-6 text-black" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/>
                        </svg>
                    </button>
                </div>
                <!-- 标题居中 -->
                <div class="absolute left-0 right-0 flex justify-center items-center pointer-events-none">
                    <span class="text-base font-medium text-black tracking-wide leading-none">订单详情</span>
                </div>
                <!-- 右侧椭圆形内容 -->
                <div class="flex-shrink-0 flex items-center ml-auto z-10" style="min-width:90px;">
                    <div class="flex items-center bg-white rounded-full border border-gray-200 px-3 py-1 shadow-sm" style="height:36px;">
                        <span class="text-black text-lg font-bold px-1">···</span>
                        <div class="w-px h-5 bg-gray-200 mx-2"></div>
                        <div class="w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center cursor-pointer" title="更多">
                            <svg class="w-4 h-4 text-black" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="6"/></svg>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 内容区域 -->
            <div class="content-area">
                <div class="p-4">
                    <!-- 顶部价格和类型标签区 -->
                    <div class="flex items-start justify-between mb-1">
                        <div class="text-2xl font-bold text-red-500">¥100.0</div>
                        <div class="flex items-center gap-2">
                            <span class="order-type-tag">排位</span>
                            <span class="order-status-badge">待取消</span>
                        </div>
                    </div>
                    <!-- 订单标题 -->
                    <div class="text-xl font-bold text-black text-left mb-2 leading-tight">代练青铜到黄金，要求24小时内完成，效率保证</div>
                    <div class="border-b border-gray-100 mb-2"></div>
                    <!-- 三大关键信息横向卡片 -->
                    <div class="grid grid-cols-3 gap-2 mb-3">
                        <div class="rounded-lg bg-orange-50 flex flex-col items-center justify-center py-3">
                            <div class="text-lg font-bold text-orange-500">¥50.0</div>
                            <div class="text-xs text-gray-500 mt-1">安全保证金</div>
                        </div>
                        <div class="rounded-lg bg-green-50 flex flex-col items-center justify-center py-3">
                            <div class="text-lg font-bold text-green-500">¥50.0</div>
                            <div class="text-xs text-gray-500 mt-1">效率保证金</div>
                        </div>
                        <div class="rounded-lg bg-blue-50 flex flex-col items-center justify-center py-3">
                            <div class="text-lg font-bold text-blue-500">24小时</div>
                            <div class="text-xs text-gray-500 mt-1">代练时限</div>
                        </div>
                    </div>
                    <!-- 订单详细信息卡片 -->
                    <div class="bg-white rounded-xl p-3 shadow-sm mb-2">
                        <div class="flex flex-col gap-1 text-sm text-gray-700">
                            <div><span class="font-medium text-gray-500">区服：</span>安卓-QQ - 默认服</div>
                            <div><span class="font-medium text-gray-500">段位要求：</span>青铜Ⅲ → 黄金Ⅰ</div>
                        </div>
                    </div>
                    <!-- 基本信息卡片 -->
                    <div class="bg-white rounded-xl p-3 shadow-sm mb-2">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-clipboard-list text-blue-400 mr-2"></i>
                            <span class="font-bold text-base text-gray-800">基本信息</span>
                        </div>
                        <div class="flex flex-col gap-2 text-sm">
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">订单号</span>
                                <span class="flex items-center">
                                    <span id="order-id" class="text-gray-700" style="user-select:all;">202406010001</span>
                                    <button id="copy-order-id" class="ml-2 text-gray-400 hover:text-blue-500 focus:outline-none" title="复制订单号">
                                        <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
                                            <rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
                                            <path d="M5 15V5a2 2 0 0 1 2-2h10"/>
                                        </svg>
                                    </button>
                                </span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">接单时间</span>
                                <span class="text-gray-700">2024-06-01 12:30</span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">发单时间</span>
                                <span class="text-gray-700">2024-06-01 12:00</span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">发单人</span>
                                <span class="text-gray-700">小明</span>
                            </div>
                        </div>
                    </div>
                    <!-- 账号信息卡片 -->
                    <div class="bg-white rounded-xl p-3 shadow-sm mb-2">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-user-shield text-blue-400 mr-2"></i>
                            <span class="font-bold text-base text-gray-800">账号信息</span>
                        </div>
                        <div class="flex flex-col gap-2 text-sm">
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">游戏账号</span>
                                <span class="flex items-center">
                                    <span id="game-account" class="text-gray-700">123456789</span>
                                    <button class="copy-btn ml-2" data-copy-target="game-account" title="复制账号">
                                        <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
                                            <rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
                                            <path d="M5 15V5a2 2 0 0 1 2-2h10"/>
                                        </svg>
                                    </button>
                                </span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">游戏密码</span>
                                <span class="flex items-center">
                                    <span id="game-password" class="text-gray-700">123456</span>
                                    <button class="copy-btn ml-2" data-copy-target="game-password" title="复制密码">
                                        <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
                                            <rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
                                            <path d="M5 15V5a2 2 0 0 1 2-2h10"/>
                                        </svg>
                                    </button>
                                </span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">游戏角色名</span>
                                <span class="text-gray-700">三角洲战士</span>
                            </div>
                            <div class="flex justify-between items-center">
                                <span class="text-gray-500">号主手机</span>
                                <span class="flex items-center">
                                    <span id="game-phone" class="text-gray-700">13812345678</span>
                                    <a href="tel:13812345678" class="ml-2 px-2 py-1 bg-blue-500 text-white rounded text-xs flex items-center gap-1 hover:bg-blue-600 transition-colors">
                                        <i class="fas fa-phone-alt"></i>拨打
                                    </a>
                                </span>
                            </div>
                        </div>
                    </div>
                    <!-- 特别说明栏 -->
                    <div class="bg-white rounded-xl p-3 shadow-sm mb-2">
                        <div class="flex items-center mb-2">
                            <i class="fas fa-info-circle text-yellow-400 mr-2"></i>
                            <span class="font-bold text-base text-gray-800">特别说明</span>
                        </div>
                        <div class="text-sm text-gray-700">
                            这里是发单时填写的特别说明内容。
                        </div>
                    </div>
                    <!-- 取消申请卡片 -->
                    <div class="cancel-apply-card">
                        <div class="cancel-apply-header">
                            <i class="fas fa-file-invoice text-blue-400"></i>
                            <span class="cancel-apply-title">取消申请</span>
                        </div>
                        <div class="cancel-apply-content">
                            <div class="cancel-apply-item">
                                <span class="cancel-apply-label">申请人</span>
                                <span class="cancel-apply-value">张三（发单人）</span>
                            </div>
                            <div class="cancel-apply-item">
                                <span class="cancel-apply-label">申请退款金额</span>
                                <span class="cancel-apply-value amount">¥80.00</span>
                            </div>
                            <div class="cancel-apply-item">
                                <span class="cancel-apply-label">取消原因</span>
                                <span class="cancel-apply-value reason">代练时间冲突，无法继续完成订单</span>
                            </div>
                        </div>
                    </div>
                    <!-- 代练要求说明模块 -->
                    <div class="bg-white rounded-xl p-3 shadow-sm mb-2">
                        <div class="flex items-center mb-1">
                            <i class="fas fa-exclamation-triangle text-red-400 mr-2"></i>
                            <span class="font-bold text-gray-800">代练要求</span>
                        </div>
                        <div class="text-sm text-red-600 font-bold mb-1">
                            禁止挂机，禁止与好友组队，要求24小时内完成。
                        </div>
                        <ol class="text-xs text-gray-700 space-y-1 pl-4 list-decimal">
                            <li>接单后请务必在30分钟内联系号主并1小时内开始代练，结束提供完整截图。</li>
                            <li>代练期间出现异常需要及时电话联系号主（发单人）。</li>
                            <li>代练期间不可以使用账号道具，不要联系或回复好友信息。</li>
                            <li>接单后不可以联系号主透露订单信息或者私下交易。</li>
                            <li>切勿使用外挂，不允许打广告、挂机、恶意骂人等恶意行为。</li>
                            <li>如有特殊要求请与号主（发单人）电话沟通确认。</li>
                        </ol>
                    </div>
                </div>
            </div>
            <!-- 底部操作栏 -->
            <div class="bg-white border-t border-gray-200 px-4 py-3">
                <div class="flex items-center justify-between gap-3">
                    <button id="rejectBtn" class="flex-1 bg-red-500 text-white px-8 py-2 rounded-full text-sm font-medium hover:bg-red-600 transition-colors">
                        驳回申请
                    </button>
                    <button id="approveBtn" class="flex-1 bg-blue-500 text-white px-8 py-2 rounded-full text-sm font-medium hover:bg-blue-600 transition-colors">
                        同意申请
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- 同意申请确认弹窗 -->
    <div id="approveModal" class="modal-overlay">
        <div class="modal-content">
            <div class="modal-title">同意取消申请</div>
            <div class="modal-message">
                <div class="mb-1">确定同意取消申请吗？</div>
                <div>同意后将退还相应金额并取消订单。</div>
            </div>
            <div class="modal-buttons">
                <div class="modal-button confirm" id="confirmApproveBtn">确定同意</div>
                <div class="modal-button cancel" id="cancelApproveBtn">我再想想</div>
            </div>
        </div>
    </div>

    <!-- 驳回申请确认弹窗 -->
    <div id="rejectModal" class="modal-overlay">
        <div class="modal-content">
            <div class="modal-title">驳回取消申请</div>
            <div class="modal-message">
                <div class="mb-1">确定驳回取消申请吗？</div>
                <div>驳回后订单将继续进行。</div>
            </div>
            <div class="modal-buttons">
                <div class="modal-button reject" id="confirmRejectBtn">确定驳回</div>
                <div class="modal-button cancel" id="cancelRejectBtn">我再想想</div>
            </div>
        </div>
    </div>

    <!-- Toast提示 -->
    <div id="toast" class="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-black bg-opacity-70 text-white px-4 py-2 rounded-lg text-sm z-50" style="display: none;">
        操作成功
    </div>

    <script>
    document.addEventListener('DOMContentLoaded', function() {
        // 订单号复制功能
        var copyBtn = document.getElementById('copy-order-id');
        var orderIdSpan = document.getElementById('order-id');
        if(copyBtn && orderIdSpan) {
            copyBtn.onclick = function() {
                var text = orderIdSpan.innerText.replace('订单号：', '').trim();
                navigator.clipboard.writeText(text).then(function() {
                    copyBtn.title = '已复制';
                    copyBtn.classList.add('text-green-500');
                    setTimeout(function(){
                        copyBtn.title = '复制订单号';
                        copyBtn.classList.remove('text-green-500');
                    }, 2000);
                });
            };
        }

        // 账号信息一键复制
        document.querySelectorAll('.copy-btn').forEach(function(btn){
            btn.onclick = function(){
                var targetId = btn.getAttribute('data-copy-target');
                var target = document.getElementById(targetId);
                if(target){
                    var text = target.innerText.trim();
                    navigator.clipboard.writeText(text).then(function(){
                        btn.classList.add('copied');
                        btn.title = '已复制';
                        setTimeout(function(){
                            btn.classList.remove('copied');
                            btn.title = '复制';
                        }, 2000);
                    });
                }
            };
        });

        // 同意申请相关
        const approveBtn = document.getElementById('approveBtn');
        const approveModal = document.getElementById('approveModal');
        const confirmApproveBtn = document.getElementById('confirmApproveBtn');
        const cancelApproveBtn = document.getElementById('cancelApproveBtn');

        approveBtn.addEventListener('click', function() {
            approveModal.style.display = 'flex';
        });

        cancelApproveBtn.addEventListener('click', function() {
            approveModal.style.display = 'none';
        });

        confirmApproveBtn.addEventListener('click', function() {
            approveModal.style.display = 'none';
            const toast = document.getElementById('toast');
            toast.textContent = '已同意取消申请';
            toast.style.display = 'block';
            setTimeout(() => {
                toast.style.display = 'none';
                // TODO: 这里添加同意后的跳转逻辑
            }, 2000);
        });

        // 驳回申请相关
        const rejectBtn = document.getElementById('rejectBtn');
        const rejectModal = document.getElementById('rejectModal');
        const confirmRejectBtn = document.getElementById('confirmRejectBtn');
        const cancelRejectBtn = document.getElementById('cancelRejectBtn');

        rejectBtn.addEventListener('click', function() {
            rejectModal.style.display = 'flex';
        });

        cancelRejectBtn.addEventListener('click', function() {
            rejectModal.style.display = 'none';
        });

        confirmRejectBtn.addEventListener('click', function() {
            rejectModal.style.display = 'none';
            const toast = document.getElementById('toast');
            toast.textContent = '已驳回取消申请';
            toast.style.display = 'block';
            setTimeout(() => {
                toast.style.display = 'none';
                // TODO: 这里添加驳回后的跳转逻辑
            }, 2000);
        });

        // 点击遮罩层关闭弹窗
        [approveModal, rejectModal].forEach(modal => {
            modal.addEventListener('click', function(e) {
                if (e.target === modal) {
                    modal.style.display = 'none';
                }
            });
        });
    });
    </script>
</body>
</html> 